<div class="col-sm-12 mt20">

    <div class="panel panel-default">
        <div class="panel-body" ng-keyup="myKeyup($event)">
            <div class="col-sm-2">
                <input type="text" class="form-control" placeholder="订单编号" ng-model="searchform.code">
            </div>
            <div class="col-sm-2">
                <input type="text" class="form-control" placeholder="订单名称" ng-model="searchform.title">
            </div>
            <div class="col-sm-2">
                <input type="text" class="form-control" placeholder="商品编号" ng-model="searchform.sale_code">
            </div>
            <div class="col-sm-2">
                <input type="text" class="form-control" placeholder="卡面号" ng-model="searchform.smart_card_no">
            </div>
            <div class="col-sm-2">
                <input type="text" class="form-control" placeholder="设备号" ng-model="searchform.device_code">
            </div>
            <div class="col-sm-2">
                <button class="btn btn-info search btn-block" ng-click="loadlist(1)">立即搜索</button>
            </div>
        </div>

        <div class="panel-body">
            <div class="panel panel-info" ng-repeat="orderList in orderComplexList">
                <div class="panel-heading" ng-if="orderList.length">
                    <span>订单编号:&nbsp;{{orderList[0].parent_order_code}}</span>
                    <span style="margin-left: 50px;">数量:&nbsp;{{orderList[0].parent_num}}</span>
                    <span style="margin-left: 50px;">金额:&nbsp;{{orderList[0].parent_pay_fee}}元</span>
                    <span style="margin-left: 50px;">支付状态:&nbsp;{{orderList[0].parent_is_pay == '1'? '已支付': '未支付'}}</span>
                </div>
                <table class="table table-bordered panel-body">
                    <thead>
                        <tr>
                            <th class="col-md-1 text-center">订单编号</th>
                            <th class="col-md-1 text-center">订单名称</th>
                            <th class="col-md-1 text-center">卡面号</th>
                            <th class="col-md-1 text-center">购买/使用/归还</th>
                            <th class="col-md-1 text-center">支付金额</th>
                            <th class="col-md-1 text-center">支付状态</th>
                            <th class="col-md-1 text-center">下单时间</th>
                            <th class="col-md-1 text-center">操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr ng-if="!orderList.length">
                            <td class="text-center">{{orderList.code}}</td>
                            <td class="text-center">{{orderList.title}}</td>
                            <td class="text-center">{{orderList.smart_card_no}}</td>
                            <td class="text-center">{{orderList.num}}/{{orderList.used}}/{{orderList.restore}}</td>
                            <td class="text-center">{{orderList.pay_fee}}</td>
                            <td class="text-center">{{orderList.is_pay == '1'? '已支付': '未支付'}}</td>
                            <td class="text-center">{{orderList.create_time}}</td>
                            <td class="text-center">
                                <button type="button" class="btn btn-info btn-xs" ng-click="orderInfo(order)">订单信息</button>
                            </td>
                        </tr>
                        <tr ng-if="orderList.length" ng-repeat="order in orderList">
                            <td class="text-center">{{order.code}}</td>
                            <td class="text-center">{{order.title}}</td>
                            <td class="text-center">{{order.smart_card_no}}</td>
                            <td class="text-center">{{order.num}}/{{order.used}}/{{order.restore}}</td>
                            <td class="text-center">{{order.pay_fee}}</td>
                            <td class="text-center">{{order.is_pay == '1'? '已支付': order.is_pay == '2'? '已退款': '未支付'}}</td>
                            <td class="text-center">{{order.create_time}}</td>
                            <td class="text-center">
                                <button type="button" class="btn btn-info btn-xs" ng-click="orderInfo(order)">订单信息</button>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>

        </div>

        <div class="text-right" style="background-color: white; margin-right: 30px">
            <pagination total-items="totalItems" ng-model="currentPage" ng-change="loadlist(currentPage)" previous-text="上一页" next-text="下一页"
                first-text="首页" last-text="尾页" max-size="5" boundary-links="true" rotate="false" items-per-page="itemsPerPage"
                class="m-t-none m-b"></pagination>
        </div>

    </div>
</div>